<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: tutoring.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tutoring.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="tutoring_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a7c325d7739785c6f243a0a77a0de6d0f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#a7c325d7739785c6f243a0a77a0de6d0f">addTutoringMenuBox</a> ()</td></tr>
<tr class="memitem:aabc03d5abc5359e2d8016964c15da2b5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#aabc03d5abc5359e2d8016964c15da2b5">actionEditTutoringApplication</a> ()</td></tr>
<tr class="memitem:ac069977178f2232b78af842abb8ae08c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#ac069977178f2232b78af842abb8ae08c">actionEditTutoringApplicationForm</a> ()</td></tr>
<tr class="memitem:a026eb17114f678452844b9eb0817c833"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#a026eb17114f678452844b9eb0817c833">actionViewTutoringApplications</a> ()</td></tr>
<tr class="memitem:ae19ad9bc54d3f23debf22abcad1836d8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#ae19ad9bc54d3f23debf22abcad1836d8">actionViewTutoringApplication</a> ($uid)</td></tr>
<tr class="memitem:a7e648fa807779a8187ddd5fd20e8aa82"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#a7e648fa807779a8187ddd5fd20e8aa82">actionConsiderTutoringApplication</a> ($uid, $agree)</td></tr>
<tr class="memitem:a237478c6ea0cd5fadb68f495ec3d791e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tutoring_8php.html#a237478c6ea0cd5fadb68f495ec3d791e">getName</a> ($uid, $default='')</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7e648fa807779a8187ddd5fd20e8aa82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionConsiderTutoringApplication </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$uid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$agree</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00119">119</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>,$USER,<a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;viewTutoringApplications&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        $uid = intval($uid);</div>
<div class="line">        <span class="keywordflow">if</span> ($agree === <span class="stringliteral">&#39;false&#39;</span>)  $agree = <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">        $currentTutor = $DB-&gt;users[$uid]-&gt;get(<span class="stringliteral">&#39;tutoruid&#39;</span>);</div>
<div class="line">        <span class="keywordflow">if</span> ($agree &amp;&amp; ($currentTutor != <a class="code" href="user_8php.html#ab1f36bf07ea17cbae5b6c5a5a9508885">USER_ANONYMOUS</a>))</div>
<div class="line">        {</div>
<div class="line">                $PAGE-&gt;addMessage(<span class="stringliteral">&quot;Użytkownik &lt;i&gt;&quot;</span>. <a class="code" href="tutoring_8php.html#a237478c6ea0cd5fadb68f495ec3d791e">getName</a>($uid). <span class="stringliteral">&quot;&lt;/i&gt; (uid:$uid) już ma tutora&quot;</span>.</div>
<div class="line">                        <span class="stringliteral">&quot; - &lt;i&gt;&quot;</span>. <a class="code" href="tutoring_8php.html#a237478c6ea0cd5fadb68f495ec3d791e">getName</a>($currentTutor). <span class="stringliteral">&quot;&lt;/i&gt; (uid:$currentTutor).&quot;</span>, <span class="stringliteral">&#39;userError&#39;</span>);</div>
<div class="line">                <span class="keywordflow">return</span> <a class="code" href="tutoring_8php.html#ae19ad9bc54d3f23debf22abcad1836d8">actionViewTutoringApplication</a>($uid);</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">if</span> (!$agree &amp;&amp; ($currentTutor != $USER[<span class="stringliteral">&#39;uid&#39;</span>]))</div>
<div class="line">        {</div>
<div class="line">                $PAGE-&gt;addMessage(<span class="stringliteral">&quot;Próbujesz zrezygnować z tutoringu, do którego Cię nie przypisano.&quot;</span>,</div>
<div class="line">                        <span class="stringliteral">&#39;userError&#39;</span>);</div>
<div class="line">                <span class="keywordflow">return</span> <a class="code" href="tutoring_8php.html#ae19ad9bc54d3f23debf22abcad1836d8">actionViewTutoringApplication</a>($uid);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $DB-&gt;users[$uid]-&gt;update(array(<span class="stringliteral">&#39;tutoruid&#39;</span> =&gt; ($agree ? $USER[<span class="stringliteral">&#39;uid&#39;</span>] : <a class="code" href="user_8php.html#ab1f36bf07ea17cbae5b6c5a5a9508885">USER_ANONYMOUS</a>)));</div>
<div class="line">        $PAGE-&gt;addMessage(<span class="stringliteral">&#39;Pomyślnie &#39;</span>. ($agree ? <span class="stringliteral">&#39;za&#39;</span> : <span class="stringliteral">&#39;wy&#39;</span>) .<span class="stringliteral">&#39;rejestrowano Cię jako tutora.&#39;</span>, <span class="stringliteral">&#39;success&#39;</span>);</div>
<div class="line">        <a class="code" href="log_8php.html#a5eaecfade7f5e117c98d7635b2aba95f">logUser</a>(<span class="stringliteral">&#39;tutor &#39;</span>. ($agree ? <span class="stringliteral">&#39;become&#39;</span> : <span class="stringliteral">&#39;resign&#39;</span>), $uid);</div>
<div class="line">        <a class="code" href="tutoring_8php.html#ae19ad9bc54d3f23debf22abcad1836d8">actionViewTutoringApplication</a>($uid);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aabc03d5abc5359e2d8016964c15da2b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionEditTutoringApplication </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00023">23</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>

<p>Referenced by <a class="el" href="tutoring_8php_source.html#l00049">actionEditTutoringApplicationForm()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>, $USER, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;editTutoringApplication&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a5bbc4a39c360e15b0c00714f18d2082b">assertProfileFilled</a>())  <span class="keywordflow">return</span>;</div>
<div class="line"></div>
<div class="line">        $user = $DB-&gt;users[$USER[<span class="stringliteral">&#39;uid&#39;</span>]]-&gt;assoc(<span class="stringliteral">&#39;tutorapplication,tutoruid&#39;</span>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (empty($user[<span class="stringliteral">&#39;tutorapplication&#39;</span>]))  $status = <span class="stringliteral">&#39;brak podania&#39;</span>;</div>
<div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($user[<span class="stringliteral">&#39;tutoruid&#39;</span>] == <a class="code" href="user_8php.html#ab1f36bf07ea17cbae5b6c5a5a9508885">USER_ANONYMOUS</a>)  $status = <span class="stringliteral">&#39;oczekuje...&#39;</span>;</div>
<div class="line">        <span class="keywordflow">else</span> $status = <a class="code" href="tutoring_8php.html#a237478c6ea0cd5fadb68f495ec3d791e">getName</a>($user[<span class="stringliteral">&#39;tutoruid&#39;</span>]) .<span class="stringliteral">&#39; jest twoim tutorem :)&#39;</span>;</div>
<div class="line">        echo <span class="stringliteral">&#39;&lt;b&gt;status&lt;/b&gt;: &#39;</span>. $status .<span class="stringliteral">&#39;&lt;br/&gt;&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $PAGE-&gt;title = <span class="stringliteral">&#39;Podanie o tutora&#39;</span>;</div>
<div class="line">        $form = <span class="keyword">new</span> <a class="code" href="classForm.html">Form</a>(array(</div>
<div class="line">                array(<span class="stringliteral">&#39;richtextarea&#39;</span>, <span class="stringliteral">&#39;tutorapplication&#39;</span>,</div>
<div class="line">                                <span class="stringliteral">&#39;To jest miejsce gdzie możesz napisać list motywacyjny - czego chcesz</span></div>
<div class="line"><span class="stringliteral">                                się nauczyć, czego oczekujesz od tutora, dlaczego akurat Ty, itd.</span></div>
<div class="line"><span class="stringliteral">                                Tutorzy będą przeglądać te listy i wybierać sobie podopiecznych -</span></div>
<div class="line"><span class="stringliteral">                                ktoś skontaktuje się z Tobą mailowo w ciągu tygodnia.&#39;</span>)</div>
<div class="line">        ));</div>
<div class="line">        $form-&gt;action = <span class="stringliteral">&#39;editTutoringApplicationForm&#39;</span>;</div>
<div class="line">        $form-&gt;values = $user;</div>
<div class="line">        echo $form-&gt;getHTML();</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac069977178f2232b78af842abb8ae08c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionEditTutoringApplicationForm </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00049">49</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>,$USER,<a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;editTutoringApplication&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        $application = trim($_POST[<span class="stringliteral">&#39;tutorapplication&#39;</span>]);</div>
<div class="line">        <span class="keywordflow">if</span> (empty($_POST[<span class="stringliteral">&#39;tutorapplication&#39;</span>]))  $application = NULL;</div>
<div class="line">        $DB-&gt;users[$USER[<span class="stringliteral">&#39;uid&#39;</span>]]-&gt;update(array(</div>
<div class="line">                        <span class="stringliteral">&#39;tutorapplication&#39;</span> =&gt; $application,</div>
<div class="line">                        <span class="stringliteral">&#39;tutoruid&#39;</span> =&gt; <a class="code" href="user_8php.html#ab1f36bf07ea17cbae5b6c5a5a9508885">USER_ANONYMOUS</a></div>
<div class="line">        ));</div>
<div class="line">        $PAGE-&gt;addMessage(<span class="stringliteral">&#39;Podanie pomyślnie zapisane.&#39;</span>, <span class="stringliteral">&#39;success&#39;</span>);</div>
<div class="line">        <a class="code" href="log_8php.html#a5eaecfade7f5e117c98d7635b2aba95f">logUser</a>(<span class="stringliteral">&#39;tutor application&#39;</span>);</div>
<div class="line">        <a class="code" href="tutoring_8php.html#aabc03d5abc5359e2d8016964c15da2b5">actionEditTutoringApplication</a>();</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae19ad9bc54d3f23debf22abcad1836d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionViewTutoringApplication </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$uid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00089">89</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>

<p>Referenced by <a class="el" href="tutoring_8php_source.html#l00119">actionConsiderTutoringApplication()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>,$USER,<a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;viewTutoringApplications&#39;</span>, $uid))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line"></div>
<div class="line">        $uid = intval($uid);</div>
<div class="line">        $user = $DB-&gt;users[$uid]-&gt;assoc(<span class="stringliteral">&#39;school,graduationyear,tutorapplication,interests,tutoruid&#39;</span>);</div>
<div class="line">        $user[<span class="stringliteral">&#39;badge&#39;</span>] = <a class="code" href="user_2utils_8php.html#a29f037f468ee2716970ae6e7293644e2">getUserBadge</a>($uid, <span class="keyword">true</span>);</div>
<div class="line"></div>
<div class="line">        global <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        $PAGE-&gt;title = <span class="stringliteral">&#39;Podanie o tutora&#39;</span>;</div>
<div class="line">        $template = <span class="keyword">new</span> <a class="code" href="classSimpleTemplate.html">SimpleTemplate</a>($user);</div>
<div class="line">        ?&gt;</div>
<div class="line">        &lt;a <span class="keyword">class</span>=<span class="stringliteral">&quot;back&quot;</span> href=<span class="stringliteral">&quot;viewTutoringApplications&quot;</span>&gt;wróć&lt;/a&gt;</div>
<div class="line">        &lt;b&gt;czyje&lt;/b&gt;: %badge%&lt;br/&gt;</div>
<div class="line">        &lt;b&gt;tutor&lt;/b&gt;: &lt;?php</div>
<div class="line">                echo <a class="code" href="user_2utils_8php.html#a29f037f468ee2716970ae6e7293644e2">getUserBadge</a>($user[<span class="stringliteral">&#39;tutoruid&#39;</span>], <span class="keyword">false</span>, <span class="stringliteral">&#39;nikt&#39;</span>) .<span class="charliteral">&#39; &#39;</span>;</div>
<div class="line">                <span class="keywordflow">if</span> ($user[<span class="stringliteral">&#39;tutoruid&#39;</span>] == <a class="code" href="user_8php.html#ab1f36bf07ea17cbae5b6c5a5a9508885">USER_ANONYMOUS</a>)</div>
<div class="line">                        echo <a class="code" href="template_8php.html#a93f1d2b73c6defc9f0af8e7e17b0b47d">getButton</a>(<span class="stringliteral">&#39;zostań tutorem&#39;</span>, <span class="stringliteral">&quot;considerTutoringApplication($uid;true)&quot;</span>);</div>
<div class="line">                <span class="keywordflow">if</span> ($user[<span class="stringliteral">&#39;tutoruid&#39;</span>] == $USER[<span class="stringliteral">&#39;uid&#39;</span>])</div>
<div class="line">                        echo <a class="code" href="template_8php.html#a93f1d2b73c6defc9f0af8e7e17b0b47d">getButton</a>(<span class="stringliteral">&#39;zrezygnuj&#39;</span>,         <span class="stringliteral">&quot;considerTutoringApplication($uid;false)&quot;</span>);</div>
<div class="line">                ?&gt;&lt;br/&gt;</div>
<div class="line">        &lt;b&gt;treść&lt;/b&gt;: &lt;br/&gt;&lt;div <span class="keyword">class</span>=<span class="stringliteral">&quot;descriptionBox&quot;</span>&gt;%tutorapplication%&lt;/div&gt;</div>
<div class="line">        &lt;b&gt;zainteresowania&lt;/b&gt;: &lt;br/&gt;&lt;div <span class="keyword">class</span>=<span class="stringliteral">&quot;descriptionBox&quot;</span>&gt;%interests%&lt;/div&gt;</div>
<div class="line">        &lt;b&gt;szkoła/kierunek studiów&lt;/b&gt;: %school%&lt;br/&gt;</div>
<div class="line">        &lt;b&gt;rok uzyskania matury&lt;/b&gt;: %graduationyear%&lt;br/&gt;</div>
<div class="line">        &lt;?php</div>
<div class="line">        echo $template-&gt;finish();</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a026eb17114f678452844b9eb0817c833"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionViewTutoringApplications </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00064">64</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>,$USER,<a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;viewTutoringApplications&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line"></div>
<div class="line">        $users = $DB-&gt;query(<span class="stringliteral">&#39;SELECT uid,name,email,tutorapplication,tutoruid  FROM table_users</span></div>
<div class="line"><span class="stringliteral">                WHERE tutorapplication IS NOT NULL  ORDER BY uid&#39;</span>);</div>
<div class="line"></div>
<div class="line">        global <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        $PAGE-&gt;title = <span class="stringliteral">&#39;Lista podań o tutora&#39;</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (!count($users))  echo <span class="stringliteral">&#39;brak podań&#39;</span>;</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">        {</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;table&gt;&lt;tr&gt;&lt;th&gt;imię i nazwisko&lt;/th&gt;&lt;th&gt;tutor&lt;/th&gt;&lt;th&gt;podanie&lt;/th&gt;&lt;/tr&gt;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">foreach</span> ($users as $user)</div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;tr class=&quot;&#39;</span>. <a class="code" href="template_8php.html#a37d777a190ddf72ef569a520257dd64d">alternate</a>(<span class="stringliteral">&#39;even&#39;</span>,<span class="stringliteral">&#39;odd&#39;</span>) .<span class="stringliteral">&#39;&quot;&gt;&#39;</span>.</div>
<div class="line">                                <span class="stringliteral">&#39;&lt;td&gt;&#39;</span>. <a class="code" href="user_2utils_8php.html#a29f037f468ee2716970ae6e7293644e2">getUserBadge</a>($user[<span class="stringliteral">&#39;uid&#39;</span>], <span class="keyword">true</span>) .<span class="stringliteral">&#39;&lt;/td&gt;&#39;</span>.</div>
<div class="line">                                <span class="stringliteral">&#39;&lt;td&gt;&#39;</span>. <a class="code" href="user_2utils_8php.html#a29f037f468ee2716970ae6e7293644e2">getUserBadge</a>($user[<span class="stringliteral">&#39;tutoruid&#39;</span>], <span class="keyword">false</span>, <span class="stringliteral">&#39;nikt&#39;</span>) .<span class="stringliteral">&#39;&lt;/td&gt;&#39;</span>.</div>
<div class="line">                                <span class="stringliteral">&#39;&lt;td&gt;&#39;</span>. <a class="code" href="template_8php.html#a4fbd311bbd72b7beba6f27fe63b0acb1">getIcon</a>(<span class="stringliteral">&#39;arrow-right.png&#39;</span>, <span class="stringliteral">&#39;zobacz podanie&#39;</span>,</div>
<div class="line">                                        <span class="stringliteral">&#39;viewTutoringApplication(&#39;</span>. $user[<span class="stringliteral">&#39;uid&#39;</span>] .<span class="charliteral">&#39;)&#39;</span>) .<span class="stringliteral">&#39;&lt;/td&gt;&lt;/tr&gt;&#39;</span>;</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;/table&gt;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7c325d7739785c6f243a0a77a0de6d0f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">addTutoringMenuBox </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00011">11</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global $USER, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        $items = <a class="code" href="utils_8php.html#ae70693a7d9a8484219fe57bdf2d2a46f">parseTable</a>(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                ACTION                   =&gt; tTITLE;               ICON;</span></div>
<div class="line"><span class="stringliteral">                editTutoringApplication  =&gt; your application;     application-my.png;</span></div>
<div class="line"><span class="stringliteral">                viewTutoringApplications =&gt; list of applications; application-list.png;</span></div>
<div class="line"><span class="stringliteral">        &#39;</span>);</div>
<div class="line">        $items[<span class="stringliteral">&#39;editTutoringApplication&#39;</span>][<span class="stringliteral">&#39;perm&#39;</span>] = <a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;editProfile&#39;</span>,$USER[<span class="stringliteral">&#39;uid&#39;</span>]);</div>
<div class="line">        $PAGE-&gt;addMenuBox(<span class="stringliteral">&#39;Tutorial&#39;</span>, $items);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a237478c6ea0cd5fadb68f495ec3d791e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getName </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$uid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$default</em> = <code>''</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="tutoring_8php_source.html#l00146">146</a> of file <a class="el" href="tutoring_8php_source.html">tutoring.php</a>.</p>

<p>Referenced by <a class="el" href="tutoring_8php_source.html#l00119">actionConsiderTutoringApplication()</a>, and <a class="el" href="tutoring_8php_source.html#l00023">actionEditTutoringApplication()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($DB-&gt;users[intval($uid)]))</div>
<div class="line">                <span class="keywordflow">return</span> $default;</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">                <span class="keywordflow">return</span> $DB-&gt;users[intval($uid)]-&gt;get(<span class="stringliteral">&#39;name&#39;</span>);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
